//
//  YHOptionTitleCenterTableViewCell.m
//  ScriptKill
//
//  Created by 林宁宁 on 2021/5/20.
//  Copyright © 2021 优智汇. All rights reserved.
//

#import "YHOptionTitleCenterTableViewCell.h"
#import "UIFont+YH.h"

@implementation YHOptionTitleCenterTableViewCell

-(void)yh_optionInit{
    
    self.centerTitleLable = [UILabel new];
    self.centerTitleLable.backgroundColor = [UIColor clearColor];
    self.centerTitleLable.textAlignment = NSTextAlignmentCenter;
    self.centerTitleLable.font = [UIFont yh_pfOfSize:14];
    self.centerTitleLable.textColor = [UIColor yh_h1];
    [self.cellOptionContentView addSubview:self.centerTitleLable];
    [self.centerTitleLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.equalTo(self.cellOptionContentView);
    }];
}

-(void)setTitleEdgesLeftRight:(CGFloat)titleEdgesLeftRight{
    if(_titleEdgesLeftRight == titleEdgesLeftRight){
        return;
    }
    _titleEdgesLeftRight = titleEdgesLeftRight;
    
    [self.centerTitleLable mas_updateConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.cellOptionContentView).offset(titleEdgesLeftRight);
        make.right.equalTo(self.cellOptionContentView).offset(-titleEdgesLeftRight);
    }];
}

@end
